<%@ page language="java" import="javax.servlet.http.*" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE html>
<html lang="zh-cn">

<head>
    <title>管理员登陆</title>
    <meta http-equiv="Content-Language" content="zh-cn">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta content="MSHTML 6.00.2800.1611" name="GENERATOR">
    <link href="images/css1.css" type="text/css" rel="stylesheet">
    <link href="images/newhead.css" type="text/css" rel="stylesheet">
    <style>
        /* 全局样式重置 */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            background-color: #eef8e0;
            font-family: Arial, sans-serif;
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
        }

        /* 表单容器样式 */
       .login-form-container {
            width: 400px;
            background-color: white;
            border-radius: 10px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
            padding: 30px;
        }

        /* 标题样式 */
       .login-title {
            text-align: center;
            margin-bottom: 20px;
            color: #333;
            font-size: 24px;
        }

        /* 表单表格样式简化 */
        form table {
            width: 100%;
            border-collapse: collapse;
        }

        form table tr {
            margin-bottom: 15px;
        }

        form table td {
            padding: 10px 0;
        }

        /* 输入框样式 */
        input[type="text"],
        input[type="password"] {
            width: 100%;
            padding: 10px;
            border: 1px solid #ccc;
            border-radius: 5px;
            font-size: 16px;
        }

        /* 按钮样式 */
       .button-container {
            display: flex;
            justify-content: space-between;
            margin-top: 20px;
        }

       .button-container input[type="image"],
       .button-container a img {
            cursor: pointer;
            border-radius: 5px;
            transition: transform 0.3s ease;
        }

       .button-container input[type="image"]:hover,
       .button-container a img:hover {
            transform: scale(1.05);
        }
    </style>
    <script>
        function check() {
            var name = document.getElementById("username").value;
            var password = document.getElementById("password").value;
            if (name == null || name == '') {
                alert("用户名不能为空");
                return false;
            }
            if (password == null || password == '') {
                alert("密码不能为空");
                return false;
            }
        }
    </script>
</head>

<body>
    <form name="form" action="AdminAction!login.action" method="post" onsubmit="return check();">
        <div class="login-form-container">
            <div class="login-title">管理员登录</div>
            <table>
                <tr>
                    <td><label for="username">用户名：</label></td>
                    <td><input class="regtxt" title="请填写用户名" maxLength="16" size="16" name="admin.username"
                            id="username" type="text"></td>
                </tr>
                <tr>
                    <td><label for="password">密码：</label></td>
                    <td><input class="regtxt" title="请填写密码" maxLength="16" size="16" name="admin.password"
                            id="password" type="password"></td>
                </tr>
                <tr>
                    <td colspan="2" class="button-container">
                        <input title="登录后台" type="image" height="48" alt="登录后台" width="86" src="images/crm_17.gif"
                            name="image" onclick="this.form.submit()" />
                        <a href="../index.jsp"><img title="返回首页" height="48" alt="返回首页" src="images/crm_19.gif"
                                width="84" border="0"></a>
                    </td>
                </tr>
            </table>
        </div>
    </form>
</body>

</html>